home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / Windows & Frames / keepinframes.izs < prev    next >
Text File  |  2005-07-29  |  1KB  |  40 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Keep-in-frames script
  4. <!/TITLE>
  5.  
  6. <!DESCRIPTION>If your site uses a frames setup, you probably do not want the containing pages to be accessed individually. This script ensures they are not. When put inside the page(s) in question, the script checks to see if it's inside a frame, and redirects users to the main frame page (so the page is viewed inside the frames context) if not.
  7. <!/DESCRIPTION> 
  8.  
  9. <!CATEGORY>windows, remotes, frames<!/CATEGORY>
  10.  
  11. <!SCRIPT>
  12. <!-- START OF SCRIPT -->
  13. <!--Directions: Just add the below code to the <HEAD> section of ALL the page(s) you wish to ensure are viewed only inside your frames setup:  -->
  14. <script>
  15.  
  16. //if not in frames
  17. if (parent.frames.length==0)
  18. //CHANGE "index.htm" to the URL of your main frame page
  19. window.location.replace("index.htm")
  20. </script>
  21.  
  22. <!-- END OF SCRIPT -->
  23. <!/SCRIPT>
  24.  
  25. <!PREVIEW>
  26. <!-- START OF SCRIPT -->
  27. <!--Directions: Just add the below code to the <HEAD> section of ALL the page(s) you wish to ensure are viewed only inside your frames setup:  -->
  28. <script>
  29.  
  30. //if not in frames
  31. if (parent.frames.length==0)
  32. //CHANGE "index.htm" to the URL of your main frame page
  33. window.location.replace("index.htm")
  34. </script>
  35.  
  36.  
  37. <!-- END OF SCRIPT -->
  38. <!/PREVIEW>
  39.  
  40. <!RELATED>NONE<!/RELATED>